Ext.define('A4.view.desktop.rolemanager.CreateRoleView',{
	extend:'Ext.window.Window',
	id:'create-role-win',
	//显示此窗口时遮罩其他组件
	modal:true,
	autoShow:true,
	title:'创建角色',
	width:800,
	height:500,
	layout:'fit',
	border:false,
	items:[{
		
	    layout:'vbox',
		border:false,
		
		items:[{
			layout:'hbox',
			border:false,
			items:[
			    // fieldset start
				{
					xtype:'fieldset',
					title:'角色信息',
					width:330,
					height:200,
					style:'margin:5px',
					
					// form start
					items:[{
					    xtype:'form',
					    id:'create-role-form',
					    style:'margin:5px',
					  
					    border:false,
					    defaults: {
				           	labelSeparator :'：',
				           	labelWidth : 60,
				           	width:230
				           	},
			      	    defaultType: 'textfield',
			      	    items: [
							{
							fieldLabel: '角色名',
							    name: 'roleName',
							    style:'font-size:15px',
							    allowBlank:false
							    
							},
							{
							   xtype:'textarea',
							   name:'mark',
							   fieldLabel: '备注',
							   width:270,
							   height:40
							}
				         ]
					}]
					// form end
				  
				},
				// fieldset end
		
				// fieldset start
				{
					 xtype:'fieldset',
					 width:440,
			    	 title:'请选择权限',
			    	 height:200,
			    	 style:'margin:5px',
			    		// grid start
				    	 items:[{
				    	    xtype: 'grid',
				    	    style:'margin:5px',
				    	    dockedItems:[{    
			                 	 dock:'bottom',    
			                 	 xtype:'pagingtoolbar',
			                 	 store:Ext.create('A4.store.usermanager.UserListStore'),
			                 	 displayInfo:true,    
			                 	 displayMsg:'显示{0}-{1}条，共计{2}条',    
			                 	 emptyMsg:'没有数据'    
			                  }],
			               
			                  selModel: new Ext.selection.CheckboxModel,
			                   columns: [
				                   {
					                    text: "权限名",
					                    flex:1,
					                    sortable: true,
					                    dataIndex: 'userName'
					                },
					                {
					                    text: "描述",
					                    width: 150,
					                    sortable: true,
					                    dataIndex: 'description'
					                }],
				                   store:Ext.create('A4.store.usermanager.UserListStore')
				    	 }]
				    	 // grid end
			    	
				
				}
				//fieldset end
			
			]
		},
		{
			xtype:'fieldset',
			title:'请选择用户',
			width:780,
			height:220,
			style:'margin:5px',
			 // grid start
	    	 items:[{
	    	    xtype: 'grid',
	    	    style:'margin:5px',
	    	    dockedItems:[{    
                 	 dock:'bottom',    
                 	 xtype:'pagingtoolbar',
                 	 store:Ext.create('A4.store.usermanager.UserListStore'),
                 	 displayInfo:true,    
                 	 displayMsg:'显示{0}-{1}条，共计{2}条',    
                 	 emptyMsg:'没有数据'    
                  }],
               
                  selModel: new Ext.selection.CheckboxModel,
                   columns: [
	                   {
		                    text: "用户名",
		                    flex:1,
		                    sortable: true,
		                    dataIndex: 'userName'
		                },
		                {
		                    text: "描述",
		                    width: 150,
		                    sortable: true,
		                    dataIndex: 'description'
		                }],
	                   store:Ext.create('A4.store.usermanager.UserListStore')
	    	 }]
	    	 // grid end
		
		}
		]
	}],
	
	
	
	
	buttons:[{
			text:'完成',
			iconCls:'create-user-finsh',
			id:'create-role-finsh'
		
		},'-',{
			text:'取消',
			iconCls:'remove',
			id:'cancel'
		    
		}]
		
	
	
});